/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sfs2x.extension.fourinarow.utils;

import com.smartfoxserver.v2.entities.data.SFSArray;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import sfs2x.extension.fourinarow.main.FourinarowExtension;

/**
 *
 * @author dodinhchien
 */
public class Data {
    public static void load(FourinarowExtension extension) throws SQLException{
        Connection conn; 
        conn = extension.getParentZone().getDBManager().getConnection();
        PreparedStatement sqlMC = conn.prepareStatement("SELECT * FROM MarkGame ");
        ResultSet resultMC = sqlMC.executeQuery();
        extension.setArrayMC(SFSArray.newFromResultSet(resultMC));
        conn.close();
    }
}
